#define _CRT_SECURE_NO_WARNINGS 1
#include "Sort.h"

void MergeSortTest()
{
	int data[] = { 10,6,7,1,3,9,4,2 };
	int sz = sizeof(data) / sizeof(data[0]);
	MergeSort(data, sz);
	PrintArray(data, sz);
}

void SelectSortTest()
{
	int data[] = { 10,6,7,1,3,9,4,2 };
	int sz = sizeof(data) / sizeof(data[0]);
	SelectSort(data, sz);
	printf("SelectSort:");
	PrintArray(data, sz);
}

void HeapSortTest()
{
	int data[] = { 10,6,7,1,3,9,4,2 };
	int sz = sizeof(data) / sizeof(data[0]);
	HeapSort(data, sz);
	printf("HeapSort:");
	PrintArray(data, sz);
}

void BubbleSortTest()
{
	int data[] = { 9,8,7,6,5,4,3,2,1,0 };
	int sz = sizeof(data) / sizeof(data[0]);
	BubbleSort(data, sz);
	PrintArray(data, sz);
}

void QuickSrotTest()
{
	srand((unsigned int)time(0));

	int data[] = { 10,6,7,1,3,9,4,2 };
	int sz = sizeof(data) / sizeof(data[0]);
	QuickSortNonR(data, 0, sz-1);
	PrintArray(data, sz);
}

int main()
{
	BubbleSortTest();
	return 0;
}